package com.own.business.pay.module.wechat.entity.response;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * WechatNotifyResponse
 *
 * @author chenxueli
 * @date 2023-08-28 10:05:00
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class WechatNotifyResponse implements Serializable {

    @Schema(title = "返回状态码")
    private String code;

    @Schema(title = "返回信息")
    private String message;


    /**
     * 成功
     *
     * @return WechatNotifyResponse
     */
    public static WechatNotifyResponse success() {
        return new WechatNotifyResponse("SUCCESS", "OK");
    }

    /**
     * 失败
     *
     * @param message 失败信息
     * @return WechatNotifyResponse
     */
    public static WechatNotifyResponse fail(String message) {
        return new WechatNotifyResponse("FAIL", message);
    }

}
